// 测试数据模板
export const testData = {
  // 汽车行业测试数据
  automotive: {
    productInfo: {
      productId: "P-180T-001",
      productName: "发动机活塞",
      productCategory: "汽车零部件",
      description: "1.8T涡轮增压发动机活塞",
      material: "铝合金",
      specifications: {
        outerDiameter: { value: 82.5, unit: "mm", tolerance: "±0.02mm" },
        height: { value: 65.8, unit: "mm", tolerance: "±0.05mm" },
        weight: { value: 320, unit: "g", tolerance: "±6g" }
      },
      annualDemand: 50000
    },
    orders: [
      {
        orderId: "ORD-2024-001",
        customerName: "大众汽车",
        customerLevel: "A",
        productModel: "P-180T-001",
        quantity: 1000,
        deliveryDate: "2024-01-15",
        priority: "HIGH",
        orderAmount: 150000
      }
    ],
    processFlow: [
      {
        operationId: "OP-10",
        operationName: "毛坯检验",
        sequence: 1,
        equipmentType: "检测设备",
        standardTime: { value: 0.5, unit: "分钟/件" },
        setupTime: { value: 0, unit: "分钟" },
        personnelRequirement: "质检员",
        qualityRequirement: "外观无缺陷"
      }
    ],
    equipment: [
      {
        equipmentId: "CNC-001",
        equipmentName: "数控车床1",
        equipmentType: "车床",
        dailyCapacity: { value: 480, unit: "分钟" },
        efficiencyFactor: 0.85,
        maintenanceSchedule: "每周一维护",
        status: "NORMAL"
      }
    ],
    personnel: [
      {
        personnelId: "OP-001",
        name: "张三",
        jobType: "车工",
        skillLevel: "高级",
        dailyWorkHours: { value: 8, unit: "小时" },
        operableEquipment: ["CNC-001", "CNC-002"],
        status: "ON_DUTY"
      }
    ],
    constraints: {
      hardConstraints: [],
      softConstraints: []
    }
  },

  // 化工行业测试数据
  chemical: {
    productInfo: {
      productId: "CHEM-001",
      productName: "聚丙烯",
      productCategory: "化工产品",
      description: "工业级聚丙烯树脂",
      material: "聚丙烯",
      specifications: {
        meltIndex: { value: 25, unit: "g/10min", tolerance: "±2" },
        density: { value: 0.91, unit: "g/cm³", tolerance: "±0.01" }
      },
      annualDemand: 100000
    },
    orders: [],
    processFlow: [],
    equipment: [],
    personnel: [],
    constraints: {
      hardConstraints: [],
      softConstraints: []
    }
  },

  // 电子行业测试数据
  electronics: {
    productInfo: {
      productId: "ELEC-001",
      productName: "电路板",
      productCategory: "电子产品",
      description: "多层印刷电路板",
      material: "FR4",
      specifications: {
        layers: { value: 4, unit: "层", tolerance: "±0" },
        thickness: { value: 1.6, unit: "mm", tolerance: "±0.1mm" }
      },
      annualDemand: 20000
    },
    orders: [],
    processFlow: [],
    equipment: [],
    personnel: [],
    constraints: {
      hardConstraints: [],
      softConstraints: []
    }
  }
}

// 获取指定行业的测试数据
export const getTestData = (industry = 'automotive') => {
  return testData[industry] || testData.automotive
}

// 获取所有可用的行业
export const getAvailableIndustries = () => {
  return Object.keys(testData)
}

export default testData 